package com.geen.tuoke.ui.dialog

import android.content.Context
import androidx.databinding.DataBindingUtil
import com.geen.tuoke.R
import com.geen.tuoke.databinding.DialogTipBinding
import com.geen.tuoke.databinding.DialogUpdateBinding
import com.geen.tuoke.utils.ext.dp2px
import com.geen.tuoke.widget.dialog.DialogViewHolder
import com.geen.tuoke.widget.dialog.XXDialog

/**
 *
 * @Description: 通用提示弹框
 * @Author: geen
 * @CreateDate: 2022/1/3 15:28
 * @Version: 1.0
 */
class DialogTip(context:Context,val tips:String):XXDialog(context, R.layout.dialog_tip) {

    private var mBinding : DialogTipBinding? = null

    init {
        setWidthAndHeight(dp2px(288f), dp2px(214f))
        setCanceledOnTouchOutside(false)
        mBinding?.tvTips?.text = tips
    }
    override fun convert(holder: DialogViewHolder) {
        mBinding = DataBindingUtil.bind(holder.convertView)

        mBinding?.btnSure?.setOnClickListener {
            dismiss()
        }
    }
}